package com.vector.service;

import com.vector.mapper.BookMapper;
import com.vector.pojo.Book;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BookServiceImpl implements BookService{

    @Autowired
    private BookMapper bookMapper;

    @Override
    public List<Book> queryAllBook() {
        return bookMapper.queryAllBook();
    }

    @Override
    public Book queryBookById(String bookISBN) {
        return bookMapper.queryBookById(bookISBN);
    }

    @Override
    public int addBook(Book book) {
        return bookMapper.addBook(book);
    }

    @Override
    public int updateBook(Book book) {
        return bookMapper.updateBook(book);
    }

    @Override
    public int deleteBook(String bookISBN) {
        return bookMapper.deleteBook(bookISBN);
    }

    @Override
    public List<Book> queryBookByType(String booktype) {
        return bookMapper.queryBookByType(booktype);
    }


}
